import { IsEmpty, IsNotEmpty, IsString } from "class-validator";
import { ApiProperty } from '@nestjs/swagger';



export class RegisterInfoDTO {
    @ApiProperty({
        required:true,
        description:'数字或者字符串'
    })
    @IsNotEmpty({message:'手机号不能为空'})
    readonly phone: string|number;
    @ApiProperty()
    @IsNotEmpty({message:'姓名不能为空'})
    @IsString({message:'姓名是String类型'})
    readonly name:string;
    @ApiProperty()
    @IsNotEmpty({message:'密码不能为空'})
    readonly pwd:string;
}


export class LoginInfoDTO{
    @ApiProperty({
        required:true,
        description:'手机号',
        example:'18800000001'
    })
    @IsNotEmpty({message:'手机号不能为空'})
    readonly phone:string;
    @ApiProperty({
        description:'密码',
        example:'123456'
    })
    @IsNotEmpty({message:'密码不能为空'})
    readonly pwd:string;
}